//
//  MarketHomeTouTiao.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/12/18.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "MarketHomeTouTiao.h"
#import "AboutusController.h"
@interface MarketHomeTouTiao ()
@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
@property (weak, nonatomic) IBOutlet UILabel *tuoTiaoLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomMargin;


@end

@implementation MarketHomeTouTiao

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.tuoTiaoLabel.textColor = [UIColor redColor];
    
    self.bottomMargin.constant = 0;
    
    self.tuoTiaoLabel.layer.borderColor = [UIColor redColor].CGColor;
    
    self.tuoTiaoLabel.layer.borderWidth = 0.6;
    
    self.tuoTiaoLabel.layer.masksToBounds = YES;
    
    self.tuoTiaoLabel.layer.cornerRadius = 3;
    
    self.rightLabel.font = MYFONT(14);
    
    self.tuoTiaoLabel.font = MYFONT(12);
    // Initialization code
}

- (IBAction)btnDidTap:(UIButton *)sender {
    
    AboutusController *temp = [[AboutusController alloc]init];
    
//    NSLog(@"%@",self.model.tuijianadvs.firstObject.ID);
    
    temp.urlString = self.model.articles.firstObject.content;
    
    [self.viewController.navigationController pushViewController:temp animated:YES];
    
    
}

- (void)setModel:(MarketHomeModel *)model{
    _model = model;
    
    self.rightLabel.text = _model.articles.firstObject.title;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
